$(function(){
    var key = getCookie('key');
    if(!key){
        window.location.href = WapSiteUrl+'/tmpl/member/login.html';
    }
    if(key){
        $.ajax({
            type:"GET",
            url:'/mobile/index.php?act=store&op=auto_storelist',
            data:{key:key},
            dataType:"json",
            success: function (data) {
                 if(data['code']==200){
                      // 渲染数据
                      var HTML = "";
                      var data = data['datas'];
                      for (var i=0;i<data.length;i++){
                           HTML += '<li><p><a href="/wap/tmpl/product_detail.html?goods_id='+data[i]["goods_id"]+'">'+data[i]['goods_name']+'</p> <p>套餐内容:'+data[i]['goods_jingle']+'</a></p><span></span></li>';
                      }
                      $('#goods').html(HTML);
                 }
            }
        })
    }
})